package com.mqb.quartz;

import com.google.common.base.Joiner;
import com.mqb.session.UserSession;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Enumeration;
import java.util.List;

public class TestJob implements Job {
    private static final Logger log = LoggerFactory.getLogger(TestJob.class);


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//        List<String> sessionList =
//                UserSession.getSessionList();

        Enumeration<String> keys = UserSession.getSessionMap().keys();

        String join = Joiner.on(",").join(keys.asIterator());
        log.info(join);
    }
}
